package com.crm.common.model.Enum;

/**
 * 合同类型枚举
 * @author luojie
 * @date 2021/9/8 13:52
 */
public enum ContractTypeEnum {

    //合同类型--1:非会员合同;2:会员新单合同;3:活动合同;4:会员续费合同5.兑换合同6.单品合同;7.会员单次
    NON_MEMBER_CONTRACT("1","非会员合同"),

    MEMBERSHIP_NEW_CONTRACT("2","会员新单合同"),

    ACTIVITY_CONTRACT("3","活动合同"),

    MEMBERSHIP_RENEWAL_CONTRACT("4","会员续费合同"),

    EXCHANGE_CONTRACT("5","兑换合同"),

    SINGLE_PRODUCT_CONTRACT("6","单品合同"),

    MEMBER_SINGLE_CONTRACT("7","会员单次合同");

    private String contractTypeCode;
    private String contractTypeInfo;

    ContractTypeEnum(String contractTypeCode, String contractTypeInfo){
        this.contractTypeCode = contractTypeCode;
        this.contractTypeInfo = contractTypeInfo;
    }

    public static String getValue(String contractTypeCode) {
        for (ContractTypeEnum ele : values()) {
            if(ele.contractTypeCode.equals(contractTypeCode)) return ele.contractTypeInfo;
        }
        return null;
    }

    public String getContractTypeCode(){
        return contractTypeCode;
    }

    public String getContractTypeInfo(){
        return contractTypeInfo;
    }
}
